pull: Don't crash if the URL is not found
authorColin Walters <walters@verbum.org>
Thu, 6 Feb 2014 08:46:14 +0000 (03:46 -0500)
committerColin Walters <walters@verbum.org>
Thu, 6 Feb 2014 08:46:14 +0000 (03:46 -0500)
src/libostree/ostree-repo-pull.c

index b98d132eedf748b53d48d5eef5166f688b22e4c3..ec90520cbb27a29ae02a8c3d1e9658c95d095473 100644 (file)
@@ -378,7 +378,7 @@ fetch_uri_contents_membuf_sync (OtPullData    *pull_data,
   run_mainloop_monitor_fetcher (pull_data);
   if (!fetch_data.result_stream)
     {
-      if (g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
+      if (allow_noent && g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
         {
           g_clear_error (error);
           ret = TRUE;